
* This do-file runs the vote regressions at the individual level on the USA, based on Gallup and CCES data.

* We cannot make the Gallup-based replication database (DB_For_Attitudes_Regressions_USA_Gallup.dta) publicly available. We will share it upon request with reserchears who have access to Gallup.


**************************
* Figure 2 and Table A33 *
**************************

use DB_For_Attitudes_Regressions_USA_Gallup.dta,clear

ivreghdfe serious female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious female age high_edu (trade_exposure_tot int_female=iv_trade_exposure_tot iv_int_female) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious female age high_edu (trade_exposure_tot int_high_edu=iv_trade_exposure_tot iv_int_high_edu) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious full_time female age high_edu (trade_exposure_tot int_full_time=iv_trade_exposure_tot iv_int_full_time) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious part_time female age high_edu (trade_exposure_tot int_part_time=iv_trade_exposure_tot iv_int_part_time) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious unemployed female age high_edu (trade_exposure_tot int_unemployed=iv_trade_exposure_tot iv_int_unemployed) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious student female age high_edu (trade_exposure_tot int_student=iv_trade_exposure_tot iv_int_student) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious retired female age high_edu (trade_exposure_tot int_retired=iv_trade_exposure_tot iv_int_retired) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious young female age high_edu (trade_exposure_tot int_young=iv_trade_exposure_tot iv_int_young) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious old female age high_edu (trade_exposure_tot int_old=iv_trade_exposure_tot iv_int_old) [pweight=weight], first a(czone year) cluster(czone_year) 


**************************
* Figure 2 and Table A34 *
**************************

ivreghdfe worried female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu (trade_exposure_tot int_female=iv_trade_exposure_tot iv_int_female) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu (trade_exposure_tot int_high_edu=iv_trade_exposure_tot iv_int_high_edu) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried full_time female age high_edu (trade_exposure_tot int_full_time=iv_trade_exposure_tot iv_int_full_time) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried part_time female age high_edu (trade_exposure_tot int_part_time=iv_trade_exposure_tot iv_int_part_time) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried unemployed female age high_edu (trade_exposure_tot int_unemployed=iv_trade_exposure_tot iv_int_unemployed) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried student female age high_edu (trade_exposure_tot int_student=iv_trade_exposure_tot iv_int_student) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried retired female age high_edu (trade_exposure_tot int_retired=iv_trade_exposure_tot iv_int_retired) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried young female age high_edu (trade_exposure_tot int_young=iv_trade_exposure_tot iv_int_young) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried old female age high_edu (trade_exposure_tot int_old=iv_trade_exposure_tot iv_int_old) [pweight=weight], first a(czone year) cluster(czone_year) 


*******************************************************************************************************
* Figure 2 and Table A35 - Columns 1-2 (see below for the remaining columns, on a different database) *
*******************************************************************************************************

ivreghdfe environment_priority female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe environmentalist_personal female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 


*************
* Table A36 *
*************

ivreghdfe serious female age high_edu (trade_exposure_hi=iv_trade_exposure_hi) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu (trade_exposure_hi=iv_trade_exposure_hi) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious female age high_edu (trade_exposure_li=iv_trade_exposure_li) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu (trade_exposure_li=iv_trade_exposure_li) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious female age high_edu (trade_exposure_china=iv_trade_exposure_china) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu (trade_exposure_china=iv_trade_exposure_china) [pweight=weight], first a(czone year) cluster(czone_year) 


*************
* Table A37 *
*************

ivreghdfe serious female age high_edu temperature_anomaly (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious female age high_edu temperature_anomaly_pos temperature_anomaly_neg (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious female age high_edu heat_episode (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe serious female age high_edu dry_spell (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu temperature_anomaly (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu temperature_anomaly_pos temperature_anomaly_neg (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu heat_episode (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe worried female age high_edu dry_spell (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 


***************************
* Table A35 - Columns 3-7 *
***************************

use DB_For_Attitudes_Regressions_USA_CCES.dta,clear

ivreghdfe support_renewables female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe env_more_important female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe env_more_important female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year union family_income employment_status) cluster(czone_year) 

ivreghdfe dummy_employed female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

ivreghdfe income_top10 female age high_edu (trade_exposure_tot=iv_trade_exposure_tot) [pweight=weight], first a(czone year) cluster(czone_year) 

